package com.example.spring.mapper;

import com.example.spring.Dto.ProvinceOrderCountDTO;
import com.example.spring.domain.ProductDetails2021;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
* @author 86130
* @description 针对表【product_details_2021】的数据库操作Mapper
* @createDate 2025-02-09 10:18:05
* @Entity .domain.ProductDetails2021
*/
public interface ProductDetails2021Mapper {

    @Select("SELECT province, COUNT(*) AS orderCount " +
            "FROM product_details_2021 " +
            "GROUP BY province")
    List<ProvinceOrderCountDTO> countOrdersByProvince();

    int deleteByPrimaryKey(Long id);

    int insert(ProductDetails2021 record);

    int insertSelective(ProductDetails2021 record);

    ProductDetails2021 selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(ProductDetails2021 record);

    int updateByPrimaryKey(ProductDetails2021 record);

}
